﻿using Core.DataAccess.ApiJson.SearchService;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Core.DataAccess.ApiJson.SearchServiceProviders
{
    public class EmptyProvider : ISearchProvider
    {
        public (bool IsSuccess, string Result) AddIndexData(string indexName, IndexData indexData)
        {
            return (true, string.Empty);
        }

        public Task<(bool IsSuccess, string Result)> AddIndexDataAsync(string indexName, IndexData indexData)
        {
            return Task.FromResult((true, string.Empty));
        }

        public (bool IsSuccess, string Result) AnyIndex(string indexName)
        {
            return (true, string.Empty);
        }

        public Task<(bool IsSuccess, string Result)> AnyIndexAsync(string indexName)
        {
            return Task.FromResult((true, string.Empty));
        }

        public (bool IsSuccess, string Result) BlukAdditionIndexDatas(string indexName, List<IndexData> datas)
        {
            return (true, string.Empty);
        }

        public Task<(bool IsSuccess, string Result)> BlukAdditionIndexDatasAsync(string indexName, List<IndexData> datas)
        {
            return Task.FromResult((true, string.Empty));
        }

        public (bool IsSuccess, string Result) CreateIndex(string indexName, object indexSchema)
        {
            return (true, string.Empty);
        }

        public Task<(bool IsSuccess, string Result)> CreateIndexAsync(string indexName, object indexSchema)
        {
            return Task.FromResult((true, string.Empty));
        }

        public (bool IsSuccess, string Result) DeleteIndex(string indexName)
        {
            return (true, string.Empty);
        }

        public Task<(bool IsSuccess, string Result)> DeleteIndexAsync(string indexName)
        {
            return Task.FromResult((true, string.Empty));
        }

        public (bool IsSuccess, string Result) DeleteIndexData(string indexName, string indexKey)
        {
            return (true, string.Empty);
        }

        public Task<(bool IsSuccess, string Result)> DeleteIndexDataAsync(string indexName, string indexKey)
        {
            return Task.FromResult((true, string.Empty));
        }

        public (bool IsSuccess, string Result) GetByKey(string indexName, string indexKey)
        {
            return (true, string.Empty);
        }

        public Task<(bool IsSuccess, string Result)> GetByKeyAsync(string indexName, string indexKey)
        {
            return Task.FromResult((true, string.Empty));
        }

        public (bool IsSuccess, string Result) ModifyIndex(string indexName, object indexSchema)
        {
            return (true, string.Empty);
        }

        public Task<(bool IsSuccess, string Result)> ModifyIndexAsync(string indexName, object indexSchema)
        {
            return Task.FromResult((true, string.Empty));
        }

        public (bool IsSuccess, string Result) ModifyIndexData(string indexName, IndexData indexData)
        {
            return (true, string.Empty);
        }

        public Task<(bool IsSuccess, string Result)> ModifyIndexDataAsync(string indexName, IndexData indexData)
        {
            return Task.FromResult((true, string.Empty));
        }

        public object GetNextPageDataByPrevKey(string key, int minute)
        {
            return new SearchResult
            {
                IsSuccess = true,
            };

        }

        public Task<object> GetNextPageDataByPrevKeyAsync(string key, int minute)
        {
            return Task.FromResult((object)new SearchResult
            {
                IsSuccess = true,
            });
        }

        public object SearchFieldsOfAuto(SearchPagination search, List<SearchCondition> conditions)
        {
            return new SearchResult
            {
                IsSuccess = true,
            };
        }

        public Task<object> SearchFieldsOfAutoAsync(SearchPagination search, List<SearchCondition> conditions)
        {
            return Task.FromResult((object)new SearchResult
            {
                IsSuccess = true,
            });
        }

        public object SearchOfLikeContent(SearchPagination search, int fuzziness = 1)
        {
            return new SearchResult
            {
                IsSuccess = true,
            };
        }

        public Task<object> SearchOfLikeContentAsync(SearchPagination search, int fuzziness = 1)
        {
            return Task.FromResult((object)new SearchResult
            {
                IsSuccess = true,
            });
        }

        public object SearchOfLocation(SearchPagination search)
        {
            return new SearchResult
            {
                IsSuccess = true,
            };
        }

        public Task<object> SearchOfLocationAsync(SearchPagination search)
        {
            return Task.FromResult((object)new SearchResult
            {
                IsSuccess = true,
            });
        }

        public object SearchOfRex(SearchPagination search)
        {
            return new SearchResult
            {
                IsSuccess = true,
            };
        }

        public Task<object> SearchOfRexAsync(SearchPagination search)
        {
            return Task.FromResult((object)new SearchResult
            {
                IsSuccess = true,
            });
        }

        public object SearchOfWildcard(SearchPagination search)
        {
            return new SearchResult
            {
                IsSuccess = true,
            };
        }

        public Task<object> SearchOfWildcardAsync(SearchPagination search)
        {
            return Task.FromResult((object)new SearchResult
            {
                IsSuccess = true,
            });
        }
    }
}
